package com.thwj.project.biz.enums;

/***
 * 账户出入账来源类型
 */
public enum AccountSourceTypeEnum {

    activity_sign_up_fee(1,"活动报名", AccountInoutTypeEnum.in),


    withdraw(100,"提现", AccountInoutTypeEnum.out),
    ;
    AccountSourceTypeEnum(int value, String name, AccountInoutTypeEnum inoutTypeEnum){
        this.name = name;
        this.value = value;
        this.inoutTypeEnum = inoutTypeEnum;
    }

    private int value;
    private String name;
    private AccountInoutTypeEnum inoutTypeEnum;

    public AccountInoutTypeEnum getInoutTypeEnum() {
        return inoutTypeEnum;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static AccountSourceTypeEnum getEnumByValue(Integer value){
        for (AccountSourceTypeEnum typeEnum : AccountSourceTypeEnum.values()) {
            if(typeEnum.value == value) {
                return typeEnum;
            }
        }
        return null;
    }
}
